package com.demo.annotation;

import com.demo.validation.EmailValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author wangfengchen
 */
@Constraint(validatedBy = {EmailValidator.class})
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
public @interface ValidEmail {

  String message() default "{email.error}";

  Class<?>[] groups() default {};

  Class<? extends Payload>[] payload() default {};
}
